﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MultiGed2.Controls
{
 public partial class ComboBoxOblast : UserControl
 {
  public ComboBoxOblast()
  {
   InitializeComponent();
  }

  private TypOblasti[] typyOblasti =
  {
   TypOblasti.Gordikon,
   TypOblasti.Multikon,
   TypOblasti.Multi1,
   TypOblasti.Multi2,
   TypOblasti.Multi2N,
   TypOblasti.Multi3,
   TypOblasti.Multi3N,
   TypOblasti.Multi4,
   TypOblasti.Multi5,
   TypOblasti.Multi6
  };

  public TypOblasti VybranaOblast
  {
   get {
    if (cbOblasti.SelectedIndex >= 0)
     return typyOblasti[cbOblasti.SelectedIndex];
    else
     return TypOblasti.None;
   }
  }

  public int SelectedIndex
  {
   get { return cbOblasti.SelectedIndex; }
   set { cbOblasti.SelectedIndex = value; }
  }

  public string SelectedItem
  {
   get { return cbOblasti.SelectedItem.ToString(); }
  }
 }
}
